import React, { Component } from 'react';
import { Child } from './Child';

// 父组件
export class Parent extends Component {
  // 父组件数据
  state = {
    lastName: '王',
  };
  render() {
    console.log('父', this.props);
    return (
      <div>
        <h1>Parent</h1>
        <Child lastName={this.state.lastName} money={this.props.money} />
      </div>
    );
  }
}
